<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<script>
		
	</script>
</h:head>
<h:body>

	<h:form id="formCh" enctype="multipart/form-data">
		<div>
			<p:panel>
				<h:panelGrid columns="2" style="font-size: 13px;">

					<h:outputLabel value="#{message.label_destino}"
						styleClass="LabelFont" style="margin-left:30px;" />

					<p:selectOneMenu value="#{chamadoTela.tipoProblema.destinoChamado}"
						effect="fade" style="font-size: 13px;"
						valueChangeListener="#{chamadoTela.buscaTipoProblemas}"
						immediate="true">
						<f:selectItem itemLabel="" itemValue="0" />
						<f:selectItems value="#{chamadoTela.destinoChamados}"
							var="destino" itemLabel="#{destino}" itemValue="#{destino}"
							style="font-size: 13px;" />
						<p:ajax update="idTpP" process="@form" />
					</p:selectOneMenu>

					<h:outputLabel value="#{message.label_assunto}"
						styleClass="LabelFont" style="margin-left:30px;" />

					<p:selectOneMenu id="idTpP"
						value="#{chamadoTela.tipoProblema.codigo}" effect="fade"
						style="font-size: 13px;">
						<f:selectItem itemLabel="" itemValue="0" />
						<f:selectItems value="#{chamadoTela.tipoProblemas}" var="tipo"
							itemLabel="#{tipo.descricao}" itemValue="#{tipo.codigo}"
							style="font-size: 13px;" />
						<p:ajax />
					</p:selectOneMenu>
					<h:outputLabel value="Ramal/Fone"
						styleClass="LabelFont" style="margin-left:30px;" />
						<p:inputText value="#{chamadoTela.chamado.ramal}"/>
				</h:panelGrid>

				<br />

				<h:outputLabel value="#{message.label_upload_imagem}"
					styleClass="LabelFont" />
				<br />
				<p:fileUpload id="idUploader" style="font-size: 13px;"
					fileUploadListener="#{chamadoTela.enviaArquivo}" mode="advanced"
					sizeLimit="1500000" allowTypes="/(\.|\/)(jpe?g|rar|zip|png)$/"
					label="#{message.botao_escolher}"
					uploadLabel="#{message.botao_carregar}"
					cancelLabel="#{message.botao_cancelar}" showButtons="false"
					auto="true" invalidSizeMessage="#{message.msg_tamanho_arquivo}"
					invalidFileMessage="#{message.msg_tipo_arquivo}" update=":messages" />
			</p:panel>
			<div class=".ym-grid">
				<div class=".ym-gl" style="margin-top: 8px;">
					<h:outputLabel value="#{message.label_comentario}"
						styleClass="LabelFont" />
					<br />
					<p:editor widgetVar="editaCad" id="idComen"
						value="#{chamadoTela.chamado.descricao}" width="600" />
				</div>
			</div>

			<div
				style="margin-left: -100px; float: left; margin-top: 20px; left: 50%; position: relative;">
				<p:commandButton value="#{message.botao_concluir}"
					icon="ui-icon-disk" style="font-size: 14px;"
					update=":messages,formCh" action="#{chamadoTela.salvar}" />
				<p:commandButton value="#{message.botao_cancelar}"
					onclick="editaCad.clear();dlg12.hide()" global="false"
					immediate="true" icon="ui-icon-close"
					style="font-size: 14px;margin-left: 20px;"
					rendered="#{chamadoTela.codChamadoAnt == null ? true : false}" />
			</div>
		</div>
	</h:form>
</h:body>
</html>